package tw.BBT.BasalBodyTemperature.Listeners.TabWidget;

import tw.BBT.BasalBodyTemperature.BasalBodyTemperature;
import tw.BBT.BasalBodyTemperature.Components.Common.TemperatureStatisticDraw;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.SurfaceHolder.Callback;
import android.widget.TabHost.OnTabChangeListener;
import android.widget.Toast;

public class tabs_Listener implements OnTabChangeListener {

    BasalBodyTemperature BBT;
    TemperatureStatisticDraw TSD ;

	public tabs_Listener(BasalBodyTemperature BBT, SurfaceView TemperatureStatistic) {
		this.BBT = BBT;
		TSD = new TemperatureStatisticDraw(BBT,TemperatureStatistic);

	}

	@Override
	public void onTabChanged(String tabId) {
		
		try {
			if(tabId.equals("BBTMainTab")) {
				TSD.Draw(TemperatureStatisticDraw.DrawAction.StatisticDraw);
			}
		} catch(Exception e) { }
	}

}


